<template>
  <h1>标签</h1>
  <button @click="clickbtn"></button>
</template>

<script>
import eventBus from '../utils/mitt';

export default {
  methods:{
    clickbtn(){
      eventBus.emit('postMsg','child1给child2传递了一个字符串')
    }
  }
}
</script>